package com.woniu.service.command;

import com.woniu.utils.ApplicationContextHolder;
import lombok.Data;

@Data
public class UpdateUserCouponCommand {
    private Integer id;
    private UpdateUserCouponCommandHandle handle;

    public UpdateUserCouponCommand() {
        this.handle = ApplicationContextHolder.getApplicationContext().getBean(UpdateUserCouponCommandHandle.class);
    }

    public UpdateUserCouponCommand(Integer id) {
        this();
        this.id = id;
    }

    public void excute() {
        handle.updateStatus(this);
    }
}
